package com.bjpowernode.asimple;

/*
    iphone 工厂
 */
public class IphoneFactory {

    public static Iphone produce(String model) {
        if ("Iphone12".equalsIgnoreCase(model)) {
            //生成iPhone12手机对象
            return new Iphone12();
        } else if ("Iphone12ProMax".equalsIgnoreCase(model)) {
            return new IPhone12ProMax();
        }else {
            return null;
        }
    }
}
